package gest;

import gest.Gestao;
import gest.Gestao_Impl;

import java.rmi.server.*;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

public class Server {
	public static void main(String args[]) {
		Gestao g = new Gestao_Impl(); 
		try {
			Gestao stub = (Gestao) UnicastRemoteObject.exportObject(g, 0);
			Registry registry = LocateRegistry.getRegistry();
			registry.rebind("GestaoReceitas", stub);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
	}
}
